Integrand size = 28, antiderivative size = 75 \[ \int \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=-\frac {\sqrt {2} \sqrt {a} (i A+B) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {2 B \sqrt {a+i a \tan (c+d x)}}{d} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {3608, 3561, 212} \[ \int \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\frac {2 B \sqrt {a+i a \tan (c+d x)}}{d}-\frac {\sqrt {2} \sqrt {a} (B+i A) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d} \]
[In]
[Out]
Rule 212
Rule 3561
Rule 3608
Rubi steps \begin{align*} \text {integral}& = \frac {2 B \sqrt {a+i a \tan (c+d x)}}{d}-(-A+i B) \int \sqrt {a+i a \tan (c+d x)} \, dx \\ & = \frac {2 B \sqrt {a+i a \tan (c+d x)}}{d}-\frac {(2 a (i A+B)) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d} \\ & = -\frac {\sqrt {2} \sqrt {a} (i A+B) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {2 B \sqrt {a+i a \tan (c+d x)}}{d} \\ \end{align*}
Time = 0.30 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.00 \[ \int \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\frac {-i \sqrt {2} \sqrt {a} (A-i B) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )+2 B \sqrt {a+i a \tan (c+d x)}}{d} \]
[In]
[Out]
Time = 0.14 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.84
method | result | size |
derivativedivides | \(\frac {2 i \left (-i B \sqrt {a +i a \tan \left (d x +c \right )}-\frac {\sqrt {a}\, \left (-i B +A \right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{2}\right )}{d}\) | \(63\) |
default | \(\frac {2 i \left (-i B \sqrt {a +i a \tan \left (d x +c \right )}-\frac {\sqrt {a}\, \left (-i B +A \right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{2}\right )}{d}\) | \(63\) |
parts | \(-\frac {i A \sqrt {a}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{d}+\frac {B \left (2 \sqrt {a +i a \tan \left (d x +c \right )}-\sqrt {a}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )\right )}{d}\) | \(91\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 272 vs. \(2 (59) = 118\).
Time = 0.26 (sec) , antiderivative size = 272, normalized size of antiderivative = 3.63 \[ \int \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\frac {4 \, \sqrt {2} B \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )} + \sqrt {2} d \sqrt {-\frac {{\left (A^{2} - 2 i \, A B - B^{2}\right )} a}{d^{2}}} \log \left (-\frac {4 \, {\left ({\left (-i \, A - B\right )} a e^{\left (i \, d x + i \, c\right )} + {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {{\left (A^{2} - 2 i \, A B - B^{2}\right )} a}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - \sqrt {2} d \sqrt {-\frac {{\left (A^{2} - 2 i \, A B - B^{2}\right )} a}{d^{2}}} \log \left (-\frac {4 \, {\left ({\left (-i \, A - B\right )} a e^{\left (i \, d x + i \, c\right )} - {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {{\left (A^{2} - 2 i \, A B - B^{2}\right )} a}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right )}{2 \, d} \]
[In]
[Out]
\[ \int \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\int \sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )} \left (A + B \tan {\left (c + d x \right )}\right )\, dx \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.16 \[ \int \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\frac {i \, {\left (\sqrt {2} {\left (A - i \, B\right )} a^{\frac {3}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) - 4 i \, \sqrt {i \, a \tan \left (d x + c\right ) + a} B a\right )}}{2 \, a d} \]
[In]
[Out]
Timed out. \[ \int \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\text {Timed out} \]
[In]
[Out]
Time = 7.49 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.28 \[ \int \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\frac {2\,B\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{d}-\frac {\sqrt {2}\,A\,\sqrt {-a}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,1{}\mathrm {i}}{d}-\frac {\sqrt {2}\,B\,\sqrt {a}\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {a}}\right )}{d} \]
[In]
[Out]